import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Backstage from '@/components/Backstage'

import users from "@/components/page/users"
import roles from "@/components/page/roles"
import rights from "@/components/page/rights"
import reports from "@/components/page/reports"
import orders from "@/components/page/orders"
import goods from "@/components/page/goods"
import categories from "@/components/page/categories"
import params from "@/components/page/params"
import goodsadd from "@/components/page/goodsadd"

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/Backstage',
      name: 'Backstage',
      component:Backstage,
      children:[
        {
          path:'/users',
          name:'users',
          component:users
        },
        {
          path:'/roles',
          name:'roles',
          component:roles
        },
        {
          path:'/rights',
          name:'rights',
          component:rights
        },
        {
          path:'/reports',
          name:'reports',
          component:reports
        },
        {
          path:'/orders',
          name:'orders',
          component:orders
        },
        {
          path:'/goods',
          name:'goods',
          component:goods
        },
        {
          path:'/categories',
          name:'categories',
          component:categories
        },
        {
          path:'/params',
          name:'params',
          component:params
        },
        {
          path:'/goodsadd',
          name:'goodsadd',
          component:goodsadd
        }
      ]
    }
  ]
})
